package com.init.common.utils;
/**
 *
 **/

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author weiwei
 * @Date 2021-08-16 15:16
 * @description 环境
 **/
@Component
public class ApplicationUtils {


    public static String ENV;

    @Value(value="${customer.environment}")
    public void setENV(String environment){
        ENV = environment;
    }


    /**
     * 是否是win系统
     * @return
     */
    public static boolean isWin(){
        return System.getProperty("os.name").toLowerCase().contains("win");
    }

    /**
     * 是否是测试环境
     * @return
     */
    public static boolean isTestEnvironment(){
        if(StringUtils.equals(ENV,"Test")){
            return true;
        }
        return false;
    }
}
